//
//  HSYHomeHeaderView.m
//  HSY
//
//  Created by 陈浩 on 2017/4/5.
//  Copyright © 2017年 金开门. All rights reserved.
//

#import "HSYHomeHeaderView.h"

@interface HSYHomeHeaderView ()



@end

@implementation HSYHomeHeaderView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/


+ (instancetype)headerViewIsDebug:(BOOL)isDebug{
    NSString *nibName = @"HSYHomeHeaderView";
    if (isDebug) {
        nibName = @"HSYHomeHeaderView_inView";
    }
    HSYHomeHeaderView *headerView = [[[NSBundle mainBundle] loadNibNamed:nibName owner:nil options:nil] firstObject];
    return headerView;
}

//点击收款
- (IBAction)handleCash:(id)sender {
    if (self.delegate && [self.delegate respondsToSelector:@selector(hsy_homeHeaderView:handleCashBtn:)]) {
        [self.delegate hsy_homeHeaderView:self handleCashBtn:sender];
    }
}

//点击余额
- (IBAction)handleBalance:(id)sender {
    if (self.delegate && [self.delegate respondsToSelector:@selector(hsy_homeHeaderView:handleBalanceBtn:)]) {
        [self.delegate hsy_homeHeaderView:self handleBalanceBtn:sender];
    }
}

//点击账单
- (IBAction)handleBill:(id)sender {
    if (self.delegate && [self.delegate respondsToSelector:@selector(hsy_homeHeaderView:handleBillBtn:)]) {
        [self.delegate hsy_homeHeaderView:self handleBillBtn:sender];
    }
}

- (IBAction)handleMessage:(id)sender{
    if (self.delegate && [self.delegate respondsToSelector:@selector(hsy_homeHeaderView:handleMessageBtn:)]) {
        [self.delegate hsy_homeHeaderView:self handleMessageBtn:sender];
    }
}

- (IBAction)handleServer:(id)sender{
    if (self.delegate && [self.delegate respondsToSelector:@selector(hsy_homeHeaderView:handleCustomerServiceBtn:)]) {
        [self.delegate hsy_homeHeaderView:self handleCustomerServiceBtn:sender];
    }
}


@end
